<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        //let 声明变量，const 声明常量 都是块级作用域
        // let a = 1;
        // let b = 2;
        // const obj = {
        //     a,
        //     b,
        //     [Symbol('c')] :3,
        //     [Symbol('d')] :4
        // }

        //对象简写
        // let name = name;
        // let age = age;
        // const obj = {
        //     //简写放前面
        //     name,
        //     age,
        //     //简写普通函数
        //     ageName(){
        //         console.log('hahha')
        //     }
        // }

        //对象的解构赋值
        const obj ={
            name:'lisi',
            age:'23',
            address :{
                number:12,
                area :'heart'
            }
        }
        let{name,age,address:{number}} =obj
        console.log(name)
    </script>
</body>
</html>